package afcp.alumni.file;

//import java.io.IOException;
//import java.io.InputStream;
//import java.util.List;
//
//import net.sourceforge.stripes.action.Message;
//
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.stereotype.Component;
//
//import afcp.alumni.dao.RoleDao;
//import afcp.alumni.model.db.Member;
//import afcp.alumni.service.FileUploadService;
//import afcp.alumni.service.MemberService;
//import afcp.alumni.service.UploadService;
//
//@Component("SimpleExcelMemberFileUploadService")
//public class SimpleExcelMemberFileUploadService implements FileUploadService {
//	
//	@Autowired
//	private RoleDao roleDao;
//
//	@Autowired
//	private MemberService memberService;
//
//	@Autowired
//	private UploadService uploadService;
//
//	public void handle(InputStream inputStream, AlumniFile file,
//			List<Message> failures) throws IncorrectHeaderException,
//			IOException {
//
//		//new MemberReader(inputStream, file)
//		//file.toReader(inputStream)
//		try (MemberReader memberReader = new MemberReader(inputStream, file, roleDao)) {
//			
////			browseMemberReader(memberReader, failed);
//			for (Member member : memberReader) {
//				
//				uploadService.uploadMember(member, failures);
//				
//			}
////			if (!memberIndexingBuffer.isEmpty()) {
////				memberService.addToIndex(memberIndexingBuffer);
////				memberIndexingBuffer = null;
////			}
//			uploadService.flushUploadMember();
//		}
//	}
//
//}
